# -*- coding: utf-8 -*-
'''
Created on 2013-3-9

@author: mjx
'''
from mongodb.connection import getConn

def getInfo(uid,cid):
    connection = getConn()
    db = connection.autojump
    collection  = db.info
    return collection.find({"uid":uid,"cid":cid})
    
    
def addInfo(info):
    connection = getConn()
    db = connection.autojump
    collection  = db.info
    print collection.insert(info.toDict())
    return info

if __name__ == '__main__':
    pass